{loop $options $v}
    <div class="form-group">
        <label class="control-label col-sm-2">{$v['name']}</label>
        <div class="col-sm-9 form-inline">
            <span class="form-control">首字母<font color="#999999">(不能重复)</font></span>
            <span class="form-control">数字最小值<font color="#999999">(1~9999)</font></span>
            <span class="form-control info">数字最大值<font color="#999999">(1~9999)</font></span>
            <span class="btn btn-info" onclick="addRuleRow{$v['id']}()">添加规则</span>
        </div>
    </div>
    <div class="rule-list rule-list-{$v['id']}">

    </div>
{/loop}
<script>
    console.log({$options});
    {loop $options $val}
    function addRuleRow{$val['id']}(){
        var rowText = '<div class="form-group">';
        rowText += '<label class="control-label col-sm-2"></label>';
        rowText += '<div class="col-sm-9 form-inline">';
        rowText += '<select class="form-control zimu" name="zimu_{$val['id']}[]">';
        {loop $letters $v}
        rowText += "<option>{$v}</option>";
        {/loop}
        rowText += '</select>';
        rowText += '<input type="number" class="form-control" size="1" oninput="if(value.length>4)value=value.slice(0,4)" name="min_num_{$val['id']}[]"/>';
        rowText += '<input type="number" class="form-control" size="1" oninput="if(value.length>4)value=value.slice(0,4)" name="max_num_{$val['id']}[]"/>';
        rowText += '<span class="btn btn-danger" size="2" onclick="$(this).parent().parent().remove()">删除</span>';
        rowText += '</div>';
        rowText += '</div>';
        $(".rule-list-{$val['id']}").append(rowText);
    }
    {/loop}
</script>
